package com.swagger.doc.swaggertodoc.service;

import com.swagger.doc.swaggertodoc.req.Person;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;
import java.util.Optional;

/**
 * @author yanghui
 * @version 1.0.0
 * @ClassName PersonService.java
 * @Description TODO
 * @Param
 * @createTime 2020年08月29日 16:13:00
 */
public interface PersonService {
    Optional<Person> findById(String id);

    Person save(Person blog);

    void delete(Person blog);

    Optional<Person> findOne(String id);

    List<Person> findAll();

    Page<Person> findByAuthor(String author, PageRequest pageRequest);

    Page<Person> findByTitle(String title, PageRequest pageRequest);
}
